<template>
  <div class="join-picture join-el-carousel">
    <div class="join-box">
      <div class="block">
        <el-carousel class="block-back" trigger="click" height="310px">
          <!-- <el-carousel-item
            class="block-back-student"
          >
            <div class="text">
              <p class="title-text font">{{item.name}}</p>
            <div class="title-content font">{{item.content}}</div>
            <div class="title-content font">{{item.textcontent}}</div>
            </div>
          </el-carousel-item> -->

          <el-carousel-item
            v-for="item in items"
            :key="item.id"
            class="block-back-student"
            :style="{ backgroundImage: `url(${item.back})` }"
          >
            <!-- <h3 class="small">{{ item }}</h3> -->
            <div class="text">
              <p class="title-text font">{{ item.name }}</p>
              <div class="title-content font">{{ item.content }}</div>
              <div class="title-content font">{{ item.textcontent }}</div>
            </div>
          </el-carousel-item>
        </el-carousel>
      </div>
      <div class="accounts">
        <div class="accounts-ttq">
          <h3 class="ttq-title">欢迎关注卷叔填填圈</h3>
          <img class="ttq-back" src="../assets/ttq-qrcode@2x.png" alt="" />
          <div class="ttq-search">公众号搜索"卷叔填填圈"</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      items: [
        {
          id: 1,
          name: '在校学生',
          content: '轻松赚取',
          textcontent: '奖励红包和惊喜礼物',
          back: 'https://wj.qq.com/image/pc/act/join_1@2x.jpg',
        },
        {
          id: 2,
          name: '企业管理者',
          content: '优先获得',
          textcontent: '腾讯问卷行业报告',
          back: 'https://wj.qq.com/image/pc/act/join_2@2x.jpg',
        },
        {
          id: 3,
          name: '自由职业者',
          content: '亲自参与',
          textcontent: '产品优化与迭代',
          back: 'https://wj.qq.com/image/pc/act/join_3@2x.jpg',
        },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
}

.el-carousel__item:nth-child(n + 1) {
  background-color: #056;
}

.join-picture {
  background-color: #fafafa;
  padding-bottom: 75px;
  display: flex;
  justify-content: center;
}
.join-box {
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  width: 1040px;
  border: 1px solid #dddddd;
  border-radius: 3px;
}
.block {
  width: 745px;
}
.block .el-carousel__button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 20px;
}
.block-back-student {
  background-size: cover;
  background-position: center;
}
// .block-back-enterprise {
//   background: url('../assets/join_2@2x.jpg') no-repeat;
//   background-size: 100%;
// }
// .block-back-freedom {
//   background: url('../assets/join_3@2x.jpg') no-repeat;
//   background-size: 100%;
// }
.title-text {
  font-size: 18px;
  margin-bottom: 30px;
}
.title-content {
  font-size: 38px;
}
.font {
  color: #fff;
}
.text {
  position: absolute;
  top: 50px;
  left: 40px;
}
.accounts-ttq {
  margin: 0 50px;
}
.ttq-back {
  width: 180px;
  height: 180px;
  background-size: 100%;
}
.ttq-title {
  width: 180px;
  background-color: #f63a59;
  border-radius: 4px;
  color: #fff;
  text-align: center;
  line-height: 34px;
  height: 34px;
  margin: 30px 0 15px 0;
}
.ttq-search {
  color: #f63a59;
  width: 180px;
}
</style>

<style>
.join-el-carousel .el-carousel__indicators--horizontal {
  left: 70px;
  bottom: 30px;
}
.join-el-carousel .el-carousel__button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
</style>
